package com.carter.springframework.beans.factory;

import com.carter.springframework.beans.exception.BeanException;

public interface BeanFactory {
    /**
     * 获取bean（有参）
     * @param beanName
     * @param args 参数
     * @return
     * @throws BeanException
     */
    Object getBean(String beanName,Object... args) throws BeanException;

    /**
     * 根据提供的类型获取bean
     * @param beanName
     * @param requiredType
     * @param <T>
     * @return
     * @throws BeanException
     */
    <T> T getBean(String beanName,Class<T> requiredType) throws BeanException;

    <T> T getBean(Class<T> requiredType);
}
